1. Field of the Invention
The present invention relates to an interpolation method for a binary image, and more particularly, to an improved interpolation method in which a variable threshold value used for determining a pixel value to be generated by interpolation is determined according to a context (the state value of adjacent pixels).
2. Description of the Related Art
Recently, a function for processing shape information has been added to MPEG-4. The shape information, which refers to object information of the image, is expressed as a binary image. To code such a binary image, MPEG-4 adopts a content-based arithmetic encoder (CAE). For lossy shape coding a down sampling method and an upsampling method are performed in each shape macro block. A shape image is divided into shape blocks which have Mxc3x97M block size.
The down sampling refers to a method for reducing the binary image block according to a given conversion ratio. The reduced image block is transmitted together with the conversion ratio. Here, the conversion ratio is determined such that an error between the original binary image block and an binary image block restored later is within a predetermined range.
The reduced image block obtained by the down sampling is coded by a context based arithmetic encoder (CAE) and then transmitted.
The up sampling method is used to restore such a reduced image block. Up sampling is for restoring the reduced image block into the original binary image, by interpolation.
In such an up sampling process, an effective interpolation method must not cause excessive blocking and smoothing effects in the restored binary image.
To satisfy the above requirement, it is an object of the present invention to provide an improved interpolation method in which a context (state value of pixels adjacent to a pixel (interpolated pixel) generated by interpolation) is used for interpolation, thereby reducing blocking and smoothing effects.
To achieve the above object, there is provided an interpolation method for a binary image, for restoring a reduced binary image, reduced from an original binary image by down sampling, into the original binary image, the method comprising the steps of: (a) calculating an interpolation value based on the pixel values (object pixel values) of the reduced image around an interpolated pixel; (b) calculating a context Cp (a state value of pixels (reference pixels) around the object pixels); (c) obtaining a threshold value corresponding to the calculated context; and (d) comparing the interpolation value with the threshold value of the step (c), and setting the pixel value of the interpolated pixel as xe2x80x9c1xe2x80x9d if the interpolation value is greater than the threshold value, and setting the pixel value of the interpolated pixel as xe2x80x9c0xe2x80x9d if the interpolation value is equal to or less than the threshold value.